package com.xidian.zhiancloud.service.riskcontrol.riskidenva;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xidian.zhiancloud.dao.riskcontrol.riskidenva.TRiskProcessOperationRecordMapper;
import com.xidian.zhiancloud.model.riskcontrol.TRiskProcessOperationRecordList;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 流程操作记录
 */
@Service
public class TRiskProcessOperationRecordService extends ServiceImpl
    <TRiskProcessOperationRecordMapper, TRiskProcessOperationRecordList> {

    @Autowired
    TRiskProcessOperationRecordMapper tRiskProcessOperationRecordMapper;
    
    //计划创建者
    public List<TRiskProcessOperationRecordList> getByOperatorAndOne(Long companyId,String userId){
        return tRiskProcessOperationRecordMapper.getByOperatorAndOne(companyId, userId);
    }
    
    //计划分解者
    public List<TRiskProcessOperationRecordList> getByOperatorAndResolve(Long companyId,String userId){
        return tRiskProcessOperationRecordMapper.getByOperatorAndResolve(companyId, userId);
    }

    //计划辨识人
    public List<TRiskProcessOperationRecordList> getByOperatorAndReco(Long companyId,String userId){
        return tRiskProcessOperationRecordMapper.getByOperatorAndReco(companyId, userId);
    }
    
    //第一次审核人
    public List<TRiskProcessOperationRecordList> getByOperatorAndDepart(Long companyId,String userId){
        return tRiskProcessOperationRecordMapper.getByOperatorAndDepart(companyId, userId);
    }

    //安全部门审核人
    public List<TRiskProcessOperationRecordList> getByOperatorAndSecur(Long companyId,String userId){
        return tRiskProcessOperationRecordMapper.getByOperatorAndSecur(companyId, userId);
    }

    //最终审核人
    public List<TRiskProcessOperationRecordList> getByOperatorAndEnd(Long companyId,String userId){
        return tRiskProcessOperationRecordMapper.getByOperatorAndEnd(companyId, userId);
    }
    
    public int deleteByProOperRecId(String id){
        return tRiskProcessOperationRecordMapper.deleteByProOperRecId(id);
    }
    
    public int deleteByTaskAllocatId(Long companyId,String id,String taskAllocatId){
        return tRiskProcessOperationRecordMapper.deleteByTaskAllId(companyId,id,taskAllocatId);
    }
    
}
